/*
 * @Author: ydli
 * @LastEditTime: 2021-04-24 21:48:03
 * @Description: proxy
 */
module.exports = {
    devServer: {
        proxy: {
            '/api': {
                // 此处的写法，目的是为了 将 /api 替换成 http://api.vikingship.xyz/api/
                target: 'http://api.vikingship.xyz/api/',
                // 允许跨域
                changeOrigin: true,
                ws: true,
                pathRewrite: {
                    '^/api': ''
                }
            }
        }
    }
}